<?php


namespace app\validates;


use think\Validate;

class BaseinfoValidate extends Validate {
    protected $rule =   [
        'id'  => 'require',
        'student'  => 'require',
        'password'  => 'require',
    ];

    protected $message  =   [
        'id.require' => 'ID不能为空',
        'student.require' => '姓名不能为空',
        'password.require' => '密码不能为空',
    ];

    protected $scene = [
        'add'  =>  ['student', 'password'],
        'edit'  =>  ['student', 'id'],
        'delete'  =>  ['id'],
    ];
}